home *** CD-ROM | disk | FTP | other *** search
/ Medabots Cardz / Medabots CD Cardz Rokusho.bin / pc / assets / rokusho.dxr / 00301_Script_301 < prev    next >
Text File  |  2001-12-07  |  8KB  |  263 lines

  1. property minuteman, tempdigits, tempscore, digit_one, digit_two, digit_three, digit_four,brassurl, tempscoreone, tempscoretwo, tempscorethree
  2. global thescore, finalcode, scoredigits, timescore, gotobrassurl, myFile, squam, oldscore
  3.  
  4. on beginsprite me
  5.   set the floatPrecision = 0
  6.   squam = getOSdirectory()&"\"
  7.   if objectP(myFile) then set myFile = 0  --Delete the instance if it already exists
  8.   myFile = new(xtra "fileio") -- Create an instance of FileIO
  9.   --  openFile(myFile,the moviePath&"info.txt",1) --Open the file with read access
  10.   openFile(myFile,squam&"infor.txt",1) --Open the file with read access
  11.   myVariable = readFile(myFile) --set the variable 'myVariable' to the text of the file 'info.txt'
  12.   if readFile(myFile)=VOID then --checks to see if this file exists
  13.     thescore = 0
  14.   else
  15.     thescore = myVariable
  16.     closeFile(myFile) -- Close the file
  17.   end if
  18.   myFile = 0 -- Dispose of the instance
  19.   
  20.   put thescore into member("holdscore")
  21.   
  22.   if objectP(myFile) then set myFile = 0  --Delete the instance if it already exists
  23.   myFile = new(xtra "fileio")    -- Create an instance of FileIO
  24.   --  openFile (myFile, the moviePath &"info.txt",0)--Open the file with R/W access  
  25.   openFile (myFile, squam&"infor.txt",0)--Open the file with R/W access  
  26.   delete(myFile) --deletes the file
  27.   --  createFile (myFile, the moviePath &"info.txt") --creates the file again
  28.   createFile (myFile, squam&"infor.txt") --creates the file again
  29.   --  openFile(myFile,the moviePath &"info.txt",0) --Open the file with R/W access
  30.   openFile(myFile, squam&"infor.txt",0) --Open the file with R/W access
  31.   --  mySaveString = thescore --puts the contents of the field 'input' into the variable mySaveString
  32.   mySaveString = member("holdscore").text
  33.   writeString(myFile,mySaveString) --writes text to the file
  34.   
  35.   closeFile(myFile) -- Close the file 
  36.   myFile = 0 -- Dispose of the instance
  37.   
  38.   brassurl = "http://www.medabots.com/rewards/coding/rewards_give.pl?b=fdvbnhsdlihv"
  39.   
  40.   if thescore > 10000 then
  41.     thescore = 9999
  42.   end if
  43.   
  44.   if thescore > 0 and thescore <10 then
  45.     scoredigits = 1
  46.     tempscore = thescore
  47.     tempdigits = 1
  48.   else if thescore > 9 and thescore <100 then
  49.     scoredigits = 2
  50.     tempscore = thescore
  51.     tempdigits = 2
  52.   else if thescore >99 and thescore < 1000 then
  53.     scoredigits = 3
  54.     tempscore = thescore
  55.     tempdigits = 3
  56.   else if thescore >999 and thescore < 10000 then
  57.     scoredigits = 4
  58.     tempscore = thescore
  59.     tempdigits = 4
  60.   end if
  61.   
  62.   --  Four Figures
  63.   if tempdigits = 4 then
  64.     if tempscore > 999 and tempscore <2000 then
  65.       digit_four = "q"
  66.       tempscore = tempscore - 1000
  67.       tempdigits = 3
  68.     end if
  69.     if tempscore > 1999 and tempscore <3000 then
  70.       digit_four = "u"
  71.       tempscore = tempscore - 2000
  72.       tempdigits = 3
  73.     end if
  74.     if tempscore > 2999 and tempscore <4000 then
  75.       digit_four = "j"
  76.       tempscore = tempscore - 3000
  77.       tempdigits = 3
  78.     end if
  79.     if tempscore > 3999 and tempscore <5000 then
  80.       digit_four = "c"
  81.       tempscore = tempscore - 4000
  82.       tempdigits = 3
  83.     end if
  84.     if tempscore > 4999 and tempscore <6000 then
  85.       digit_four = "k"
  86.       tempscore = tempscore - 5000
  87.       tempdigits = 3
  88.     end if
  89.     if tempscore > 5999 and tempscore <7000 then
  90.       digit_four = "b"
  91.       tempscore = tempscore - 6000
  92.       tempdigits = 3
  93.     end if
  94.     if tempscore > 6999 and tempscore <8000 then
  95.       digit_four = "r"
  96.       tempscore = tempscore - 7000
  97.       tempdigits = 3
  98.     end if
  99.     if tempscore > 7999 and tempscore <9000 then
  100.       digit_four = "w"
  101.       tempscore = tempscore - 8000
  102.       tempdigits = 3
  103.     end if
  104.     if tempscore > 8999 and tempscore <10000 then
  105.       digit_four = "n"
  106.       tempscore = tempscore - 9000
  107.       tempdigits = 3
  108.     end if
  109.   end if
  110.   
  111.   
  112.   
  113.   
  114.   --  Three Figures
  115.   if tempdigits = 3 then
  116.         if tempscore < 99 then
  117.       digit_three = "x"
  118.       tempscore = tempscore
  119.       tempdigits = 2
  120.     end if
  121.     if tempscore > 99 and tempscore <200 then
  122.       digit_three = "q"
  123.       tempscore = tempscore - 100
  124.       tempdigits = 2
  125.     end if
  126.     if tempscore > 199 and tempscore <300 then
  127.       digit_three = "u"
  128.       tempscore = tempscore - 200
  129.       tempdigits = 2
  130.     end if
  131.     if tempscore > 299 and tempscore <400 then
  132.       digit_three = "j"
  133.       tempscore = tempscore - 300
  134.       tempdigits = 2
  135.     end if
  136.     if tempscore > 399 and tempscore <500 then
  137.       digit_three = "c"
  138.       tempscore = tempscore - 400
  139.       tempdigits = 2
  140.     end if
  141.     if tempscore > 499 and tempscore <600 then
  142.       digit_three = "k"
  143.       tempscore = tempscore - 500
  144.       tempdigits = 2
  145.     end if
  146.     if tempscore > 599 and tempscore <700 then
  147.       digit_three = "b"
  148.       tempscore = tempscore - 600
  149.       tempdigits = 2
  150.     end if
  151.     if tempscore > 699 and tempscore <800 then
  152.       digit_three = "r"
  153.       tempscore = tempscore - 700
  154.       tempdigits = 2
  155.     end if
  156.     if tempscore > 799 and tempscore <900 then
  157.       digit_three = "w"
  158.       tempscore = tempscore - 800
  159.       tempdigits = 2
  160.     end if
  161.     if tempscore > 899 and tempscore <1000 then
  162.       digit_three = "n"
  163.       tempscore = tempscore - 900
  164.       tempdigits = 2
  165.     end if
  166.   end if
  167.   
  168.   
  169.   --  Two Figures
  170.   if tempdigits = 2 then
  171.     if tempscore < 10 then
  172.       digit_two = "x"
  173.       tempscore = tempscore
  174.       tempdigits = 1
  175.     end if
  176.     
  177.     if tempscore > 9 and tempscore <20 then
  178.       digit_two = "q"
  179.       tempscore = tempscore - 10
  180.       tempdigits = 1
  181.     end if
  182.     if tempscore > 19 and tempscore <30 then
  183.       digit_two = "u"
  184.       tempscore = tempscore - 20
  185.       tempdigits = 1
  186.     end if
  187.     if tempscore > 29 and tempscore <40 then
  188.       digit_two = "j"
  189.       tempscore = tempscore - 30
  190.       tempdigits = 1
  191.     end if
  192.     if tempscore > 39 and tempscore <50 then
  193.       digit_two = "c"
  194.       tempscore = tempscore - 40
  195.       tempdigits = 1
  196.     end if
  197.     if tempscore > 49 and tempscore <60 then
  198.       digit_two = "k"
  199.       tempscore = tempscore - 50
  200.       tempdigits = 1
  201.     end if
  202.     if tempscore > 59 and tempscore <70 then
  203.       digit_two = "b"
  204.       tempscore = tempscore - 60
  205.       tempdigits = 1
  206.     end if 
  207.     if tempscore > 69 and tempscore <80 then
  208.       digit_two = "r"
  209.       tempscore = tempscore - 70
  210.       tempdigits = 1
  211.     end if
  212.     if tempscore > 79 and tempscore <90 then
  213.       digit_two = "w"
  214.       tempscore = tempscore - 80
  215.       tempdigits = 1
  216.     end if
  217.     if tempscore > 89 and tempscore <100 then
  218.       digit_two = "n"
  219.       tempscore = tempscore - 90
  220.       tempdigits = 1
  221.     end if
  222.     
  223.   end if
  224.   --  One Figure
  225.   if tempdigits = 1 then
  226.     if tempscore = 0 then
  227.       digit_one = "x"
  228.     else if tempscore = 1 then
  229.       digit_one = "q"
  230.     else if tempscore = 2 then
  231.       digit_one = "u"
  232.     else if tempscore = 3 then
  233.       digit_one = "j"
  234.     else if tempscore = 4 then
  235.       digit_one = "c"
  236.     else if tempscore = 5 then
  237.       digit_one = "k"
  238.     else if tempscore = 6 then
  239.       digit_one = "b"
  240.     else if tempscore = 7 then
  241.       digit_one = "r"
  242.     else if tempscore = 8 then
  243.       digit_one = "w"
  244.     else if tempscore = 9 then
  245.       digit_one = "n"
  246.     end if
  247.   end if
  248.   
  249.   if scoredigits = 1 then
  250.     finalcode = digit_one
  251.   else if scoredigits = 2 then
  252.     finalcode = digit_two&digit_one
  253.   else if scoredigits = 3 then
  254.     finalcode = digit_three&digit_two&digit_one
  255.   else if scoredigits = 4 then
  256.     finalcode = digit_four&digit_three&digit_two&digit_one
  257.   end if
  258.   
  259.   --  put brassurl&finalcode into member("urldisplay")
  260.   gotobrassurl = brassurl&finalcode
  261. end
  262.  
  263.